/**   
 * @Title: SportteryFootballChooseAct.java 
 * @Package com.esun.rabbit2.viewer.mainact.lotteryhallact.sportteryfootballapg 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author: City Jiangsy@500wan.com  
 * @date: 2011-8-12 上午11:32:18  
 * @update：by liugan at 2012-3-13 上午12:22
 * Copyright: (C) 2011 Shenzhen E-sun Sky Net Technology Co.,ltd.
 */
package com.esun.cheetah.view.personal.sportlotteryfootball;

import com.esun.cheetah.R;

import android.os.Bundle;
import android.view.View;

/**
 * @ClassName: SportteryFootballChooseAct
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author: City Jiangsy@500wan.com
 * @date: 2011-8-12 上午11:32:18
 * 
 */
public class SportteryFootballChooseAct extends SportteryChooseActivity {

	public static int pageFlag = 0;

	/**
	 * @field:chooseListPage
	 * @description: 球类彩票的选择比赛界面(非Activity)
	 */
	private SportteryFootballChooseList chooseListPage;

	/**
	 * @field:buyLotteryPage
	 * @description: 球类彩票的购买界面(非Activity)
	 */
	private SportteryFootballBuyLottery buyLotteryPage;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		uiInIt();
	}

	private void uiInIt() {

		View viewChooseList = this.getLayoutInflater().inflate(
				R.layout.sportteryfootball_choose_list, null);
		View viewBuyLottery = this.getLayoutInflater().inflate(R.layout.sportteryfootball_buy_lottery, null);
		chooseListPage = new SportteryFootballChooseList(this, viewChooseList, getParent());

		buyLotteryPage = new SportteryFootballBuyLottery(this, viewBuyLottery, getParent());

		chooseListPage.setSportteryBuyLotteryPage(buyLotteryPage);
		buyLotteryPage.setSportteryChooseListPage(chooseListPage);

	}

	public void clean() {
		buyLotteryPage.clean();
	}

	@Override
	protected View getChooseListPageView() {
		return chooseListPage.getView();
	}

	@Override
	protected View getBuyLotteryPageView() {
		return buyLotteryPage.getView();
	}

	@Override
	public int getPageFlag() {
		return pageFlag;
	}

	@Override
	public void setPageFlag(int i) {
		pageFlag = i;
	}

	@Override
	public int getActiveCount() {
		return buyLotteryPage.getActiveItemNum();
	}

}
